package 建造者;

public class HouseDirector {
	private HouseBuilder houseBuilder;
	
	public HouseDirector(HouseBuilder houseBuilder) {
		this.houseBuilder = houseBuilder;
	}
	
	// 由指挥者制定具体怎样盖房子
	public House build() {
		houseBuilder.basic();
		houseBuilder.walls();
		houseBuilder.roofed();
		
		return houseBuilder.bulidHouse();
	}
	
	// 设置建造者
	public void setHouseBuilder(HouseBuilder houseBuilder) {
		this.houseBuilder = houseBuilder;
	}

}
